$ ->

  # Create the namespace if it doesn't exist
  $.quesse = $.quesse || {}


  # Verify that it's the first time we enter the hangout
  # Returns true if:
  # 1. We have valid parameters
  # 2. Those parameters are not in the shared state
  $.quesse.isANewcomer = (params) ->
    true # todo


  # Verify if we are the owner of the hangout
  # Returns true if
  # 1. There are no participants in the hangout
  $.quesse.isTheHangoutOwner = ->
    true # todo


  # Parse the list of participants from an event
  $.quesse.parseParticipants = (event) ->
    $.quesse.getFriendlyParticipants(event.participants)


  # Get the actual list of participants
  $.quesse.getParticipants = ->
    $.quesse.getFriendlyParticipants(gapi.hangout.getParticipants())


  # Transform a raw list of particpants to a more friendly-one
  $.quesse.getFriendlyParticipants = (raw_participants) ->
    raw_participants.map (p) -> {
      index: p.displayIndex
      id: p.person.id
      name: p.person.displayName
      image: p.person.image.url
    }


  # Get information about the current participant, in a friendly output
  $.quesse.getMyself = ->
    { } # todo


  # Get a participant by Hangout ID or Quesse ID, in a friendly output
  # The Quesse ID has a precedence on the Hangout ID
  $.quesse.getParticipant = (id) ->
    { } # todo


  # Get the information of this hangout, in a friendly output
  $.quesse.getHangoutInfos = ->
    { } # todo

